home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIPlaintextEditor.idl < prev    next >
Text File  |  2006-05-08  |  5KB  |  117 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsISupports.idl"
  39.  
  40. %{C++
  41. #include "nsIDOMKeyEvent.h"
  42. %}
  43.  
  44. [ptr] native nsIDOMKeyEvent(nsIDOMKeyEvent);
  45.  
  46. [scriptable, uuid(b5f39ed4-1dd1-11b2-9d00-fd54d6f54962)]
  47. interface nsIPlaintextEditor : nsISupports
  48. {
  49.  
  50.   /* the bits in an editor behavior mask. */
  51.   const short eEditorPlaintextBit = 0;                  /* only plain text entry is allowed via events */
  52.   const short eEditorSingleLineBit = 1;                 /* enter key and CR-LF handled specially */
  53.   const short eEditorPasswordBit = 2;                   /* text is not entered into content, only a representative character */
  54.   const short eEditorReadonlyBit = 3;                   /* editing events are disabled.  Editor may still accept focus. */
  55.   const short eEditorDisabledBit = 4;                   /* all events are disabled (like scrolling).  Editor will not accept focus. */
  56.   const short eEditorFilterInputBit = 5;                /* text input is limited to certain character types, use mFilter */
  57.   const short eEditorMailBit = 6;                       /* use mail-compose editting rules */
  58.   const short eEditorUseAsyncUpdatesBit = 7;            /* prevent immediate reflows and view refreshes */
  59.   const short eEditorEnableWrapHackBit = 8;             /* allow the editor to set font: monospace on the root node */
  60.   const short eEditorWidgetBit = 9;                     /* bit for widgets */
  61.   const short eEditorNoCSSBit = 10;                     /* this HTML editor should not create css styles */
  62.  
  63.   const long eEditorPlaintextMask            = 1;
  64.   const long eEditorSingleLineMask           = 2;
  65.   const long eEditorPasswordMask             = 4;
  66.   const long eEditorReadonlyMask             = 8;
  67.   const long eEditorDisabledMask             = 16;
  68.   const long eEditorFilterInputMask          = 32;
  69.   const long eEditorMailMask                 = 64;
  70.   const long eEditorUseAsyncUpdatesMask      = 128;
  71.   const long eEditorEnableWrapHackMask       = 256;
  72.   const long eEditorWidgetMask               = 512;
  73.   const long eEditorNoCSSMask                = 1024;
  74.  
  75.   /**
  76.     * The length of the contents in characters.
  77.     */
  78.   readonly attribute long textLength;
  79.  
  80.   /**
  81.     * The maximum number of characters allowed.
  82.     */
  83.   attribute long maxTextLength;
  84.  
  85.   /** Get and set the body wrap width.
  86.     * 
  87.     * Special values:
  88.     *    0 = wrap to window width
  89.     *   -1 = no wrap at all
  90.     */
  91.   attribute long wrapWidth;
  92.  
  93.   /** 
  94.    * EditorKeyPress consumes a keyevent.
  95.    * @param aKeyEvent    key event to consume
  96.    */
  97.   [noscript]void handleKeyPress(in nsIDOMKeyEvent aKeyEvent);
  98.  
  99.   /**
  100.    * Inserts a string at the current location,
  101.    * given by the selection.
  102.    * If the selection is not collapsed, the selection is deleted
  103.    * and the insertion takes place at the resulting collapsed selection.
  104.    *
  105.    * @param aString   the string to be inserted
  106.    */
  107.    void insertText(in DOMString aStringToInsert);
  108.   
  109.   /**
  110.    * Insert a line break into the content model.
  111.    * The interpretation of a break is up to the implementation:
  112.    * it may enter a character, split a node in the tree, etc.
  113.    * This may be more efficient than calling InsertText with a newline.
  114.    */
  115.   void insertLineBreak();
  116. };
  117.